<template>
  <component :is="componentType" v-bind="$props" />
</template>

<script>
// 图表
import BarChart from '../charts/BarChart.vue';
import FunnelChart from '../charts/FunnelChart.vue';
import GaugeChart from '../charts/GaugeChart.vue';
import GraphChart from '../charts/GraphChart.vue';
import KChart from '../charts/KChart.vue';
import LineChart from '../charts/LineChart.vue';
import PieChart from '../charts/PieChart.vue';
import RadarChart from '../charts/RadarChart.vue';
import TreeChart from '../charts/TreeChart.vue';
// 形状
// import Circle from '../shapes/Circle.vue';
// import Rectangle from'../../shapes/Rectangle.vue';
// import Triangle from '../../shapes/Triangle.vue';
// 标题
// import Content from '../../text-area/Content.vue';
// import Headline from '../../text-area/Headline.vue';
// import NormalTitle from '../../text-area/NormalTitle.vue';
// import Subhead from '../../text-area/Subhead.vue';
// 地图
// import LineLayer from '../../map/LineLayer.vue';
// import MarkerCluster from '../../map/MarkerCluster.vue';
export default {
  name: 'ComponentTransform',
  props: {
    info: {
      type:Object
    }
  },
  data(){
    return{

    }
  },
  computed: {
    componentType(){
      return this.info.code || '';
    },
  },
  components: {
    BarChart,
    FunnelChart,
    GaugeChart,
    GraphChart,
    KChart,
    LineChart,
    PieChart,
    RadarChart,
    TreeChart,
    // Circle,
    // Rectangle,
    // Triangle,
    // Content,
    // Headline,
    // NormalTitle,
    // Subhead,
    // LineLayer,
    // MarkerCluster,
  },
}
</script>